<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/MasterPage.Master" CodeBehind="Details.aspx.vb" Inherits="RUHResturants.Details" %>
<%@ Register assembly="GMaps" namespace="Subgurim.Controles" tagprefix="cc1" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
    .style2
    {
        text-align: left;
    }
        .style4
        {
            font-size: xx-large;
        }
        .style5
        {
            font-size: large;
            font-weight: bold;
        }
        .style6
        {
            border: 4px solid #000000;
        }
    </style>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">



    <script  language="javascript"   >

    function AddTagToComment(TagName) {
        var tb = document.getElementById("<%=TagField.ClientID%>");
        if (tb.value.indexOf(TagName) >= 0) return;
        else tb.value = tb.value + TagName + " ";
    }
</script>
    &nbsp;<table>
        <tr>
            <td>
                <cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" />
              </td>
            <td align="left" width="50%" style="width: -350%">
                <asp:Label ID="Label5" runat="server" Text="Label"></asp:Label>
            </td>
            <td align="left" width="50%" style="width: -150%">
                &nbsp;</td>
            <td align="left" width="50%" style="width: -83%">
                &nbsp;</td>
            <td align="left" width="50%" style="width: -50%">
                &nbsp;</td>
            <td align="left" width="50%" style="width: -30%">
                &nbsp;</td>
            <td align="left" width="50%" style="width: -16%">
                &nbsp;</td>
            <td align="left" width="50%" style="width: -7%">
                &nbsp;</td>
            <td align="left" width="50%" style="width: 0%">
                &nbsp;</td>
            <td align="left" width="50%" style="width: 5%">

                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td align="left" width="50%" colspan="9" class="style4">
                Resturant&#39;s Details:

    <asp:Button ID="Button2" runat="server" Text="Edit" BorderStyle="None" Width="37px" 
                    CausesValidation="False" Font-Bold="True" />
            </td>
        </tr>
        <tr>
            <td>
                <table cellpadding="0" cellspacing="0" class="style6">
                    <tr>
                        <td>
                <cc1:GMap ID="GMap1" runat="server" />
                        </td>
                    </tr>
                </table>
            </td>
            <td align="left" width="50%" colspan="9">
            Current Score 
            <div class="HeaderFont" >
            <cc1:Rating ID="Rating2" runat="server"
                    StarCssClass="ratingStar"
                    EmptyStarCssClass="emptyRatingStar"
                    FilledStarCssClass="filledRatingStar"
                    WaitingStarCssClass="savedRatingStar"
                    CurrentRating="5"
                    MaxRating="5"
                    ReadOnly="true"
                  >
                  </cc1:Rating></div>
            
                <asp:DataList ID="DataList1" runat="server" DataKeyField="ResturantId" 
                    DataSourceID="SQLResturantDetails">
                    <ItemTemplate>
                    <table width="400px" cellpadding="3px">
                        <tr>
                            <td class="DetailsTableCol1">
                                Name:
                            </td>
                            <td class="DetailsTableCol2">
                                <asp:Label ID="RestNameLabel" runat="server" Text='<%# Eval("RestName") %>' />
                            </td>
                        </tr>
                        <tr>
                          
                        <tr>
                            <td class="DetailsTableCol1">
                                Address:
                        
                            </td>
                            <td class="DetailsTableCol2">
                                <asp:Label ID="AddressLabel" runat="server" Text='<%# Eval("Address") %>' />
                            </td>
                        </tr>
                     
                            <td class="DetailsTableCol1">
                                Telephone:
                        
                            </td>
                            <td class="DetailsTableCol2">
                                <asp:Label ID="TelephonLabel" runat="server" Text='<%# Eval("Telephone") %>' />
                        
                            </td>
                        </tr>
                        <tr>
                            <td class="DetailsTableCol1">
                               Email:
                        
                            </td>
                            <td class="DetailsTableCol2">
                                <asp:Label ID="EmailLabel" runat="server" Text='<%# Eval("Email") %>' />
                        
                            </td>
                        </tr>
                        <tr>
                            <td class="DetailsTableCol1">
                                Price Level:
                       
                            </td>
                            <td class="DetailsTableCol2">
                                 <asp:Label ID="PriceLevelLabel" runat="server" 
                            Text='<%# Eval("PriceLevel") %>' />
                        
                            </td>
                        </tr>
                        <tr>
                            <td class="DetailsTableCol1">
                                Luxury Level:
                        
                            </td>
                            <td class="DetailsTableCol2">
                                <asp:Label ID="LuxuryLevelLabel" runat="server" 
                            Text='<%# Eval("LuxuryLevel") %>' />
                        
                            </td>
                        </tr>
                        <tr>
                            <td class="DetailsTableCol1">
                                Eating Service Type:
                        
                            </td>
                            <td class="DetailsTableCol2">
                                <asp:Label ID="EatingServiceLabel" runat="server" 
                            Text='<%# Eval("EatingService") %>' />
  
                            </td>
                        </tr>
                            <tr>
                            <td class="DetailsTableCol1">
                                Working Hours:
                        
                        
                            </td>
                            <td class="DetailsTableCol2">
                               <asp:Label ID="WorkingHoursLabel" runat="server" 
                            Text='<%# Eval("WorkingHours") %>' />
  
                            </td>
                        </tr>
                            <tr>
                            <td class="DetailsTableCol1">
                                Added by:
                        
                        
                            </td>
                            <td class="DetailsTableCol2">
                                <asp:Label ID="UserNameLabel" runat="server" Text='<%# Eval("UserName") %>' />
                        
  
                            </td>
                        </tr>
                    </table>
                        
                    </ItemTemplate>
                </asp:DataList>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td align="left" width="50%" colspan="9">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    DataSourceID="Foodtype" BackColor="White" BorderColor="#DEDFDE" 
                    BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" 
                    GridLines="Vertical" Width="390px">
                    <RowStyle BackColor="#F7F7DE" />
                    <Columns>
                        <asp:BoundField DataField="FoodType" HeaderText="Food Type" 
                            SortExpression="FoodType" />
                        <asp:BoundField DataField="Description" HeaderText="Description" 
                            SortExpression="Description" />
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" />
                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" />
                </asp:GridView>
                <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
                    BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" 
                    CellPadding="4" DataSourceID="Services" ForeColor="Black" GridLines="Vertical">
                    <RowStyle BackColor="#F7F7DE" />
                    <Columns>
                        <asp:CheckBoxField DataField="Internet" FooterText="Facilitates" 
                            HeaderText="Internet" SortExpression="Internet" ReadOnly="True" />
                        <asp:CheckBoxField DataField="Parking" HeaderText="Parking" 
                            SortExpression="Parking" ReadOnly="True" />
                        <asp:CheckBoxField DataField="Delivery" HeaderText="Delivery" 
                            SortExpression="Delivery" ReadOnly="True" />
                        <asp:CheckBoxField DataField="Toilet" HeaderText="Toilet" 
                            SortExpression="Toilet" ReadOnly="True" />
                        <asp:CheckBoxField DataField="ChildChair" HeaderText="Child Chair" 
                            SortExpression="ChildChair" ReadOnly="True" />
                        <asp:CheckBoxField DataField="TV" HeaderText="TV" SortExpression="TV" 
                            ReadOnly="True" />
                        <asp:CheckBoxField DataField="Music" HeaderText="Music" 
                            SortExpression="Music" ReadOnly="True" />
                        <asp:CheckBoxField DataField="PlayingArea" HeaderText="Playing Area" 
                            SortExpression="PlayingArea" ReadOnly="True" />
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" />
                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="White" />
                </asp:GridView>
                <asp:SqlDataSource ID="Services" runat="server" 
                    ConnectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\RUHRestaurantsDB.accdb;Persist Security Info=True" 
                    ProviderName="System.Data.OleDb" 
                    SelectCommand="SELECT  Facilities.Internet, Facilities.Parking, Facilities.Delivery, Facilities.Toilet, Facilities.ChildChair, Facilities.TV, Facilities.Music, Facilities.PlayingArea FROM (Facilities INNER JOIN Resturants ON Facilities.RestId = Resturants.Id) WHERE (Facilities.RestId = 2) ">
                </asp:SqlDataSource>
                <br />
                <asp:SqlDataSource ID="SQLResturantDetails" runat="server" 
                    ConnectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\RUHRestaurantsDB.accdb;Persist Security Info=True" 
                    ProviderName="System.Data.OleDb">
                </asp:SqlDataSource>
                <asp:SqlDataSource ID="Foodtype" runat="server" 
                    ConnectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\RUHRestaurantsDB.accdb;Persist Security Info=True" 
                    ProviderName="System.Data.OleDb" SelectCommand="SELECT  FoodTypes.FoodType, FoodTypes.Description
FROM            (Rest_Food_Type INNER JOIN
                         FoodTypes ON Rest_Food_Type.FoodTypeId = FoodTypes.Id)
WHERE        (Rest_Food_Type.RestId = 4)"></asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td colspan="10" class="DetailsImages">
                Restaurant Pictures:<br />
                <asp:DataList ID="DataList2" runat="server" DataSourceID="SqlDataSource1" 
                    RepeatDirection="Horizontal" RepeatLayout="Flow">
                    <ItemTemplate>
                    <asp:Image ID="Image1" runat="server" BorderWidth="1px" ImageUrl='<%# Eval("ImgName", "RestImages/{0}") %>' Height="80" Width="70" />
                    </ItemTemplate>
                </asp:DataList>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\RUHRestaurantsDB.accdb" 
                    ProviderName="System.Data.OleDb" >
                </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td colspan="10">
                <span class="style5">Users Comments</span><br />
                <br />
                
                <asp:Label ID="LBcomments" runat="server" Font-Size="Large" ForeColor="Red"></asp:Label>
                <br />
                <hr />
                <asp:DataList ID="DataList3" runat="server" DataKeyField="Id" 
                    DataSourceID="comments" CellPadding="4" 
                    style="text-align: left" ForeColor="#333333" BorderColor="Silver" 
                    GridLines="Both" ShowFooter="False" Width="877px">
                    <FooterStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="True" />
                    <AlternatingItemStyle BackColor="White" ForeColor="Black" Font-Bold="False" 
                        Font-Italic="False" Font-Overline="False" Font-Strikeout="False" 
                        Font-Underline="False" />
                    <ItemStyle BackColor="#CCCCCC" ForeColor="#333333" Font-Bold="False" 
                        Font-Italic="False" Font-Overline="False" Font-Strikeout="False" 
                        Font-Underline="False" />
                    <SelectedItemStyle BackColor="#CCCCCC" Font-Bold="True" ForeColor="#333333" 
                        Font-Italic="False" Font-Overline="False" Font-Strikeout="False" 
                        Font-Underline="False" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <ItemTemplate>
                        <b>Title: </b><asp:Label ID="TitleLabel" runat="server" Text='<%# Eval("Title") %>' />
                        <br />
                        <b>Post Date: </b><asp:Label ID="Label4" runat="server" Text='<%# Eval("Date") %>' />
                        <br />
                        <b>Added By: </b><asp:Label ID="UserIdLabel" runat="server" Text='<%# Eval("UserId") %>' />
                        <br />
                        
                        <b>Comments Body:</b><br />
                        <asp:Label ID="CommentsLabel" runat="server" Text='<%# Eval("Comments") %>' />
                        <br />
                    </ItemTemplate>
                </asp:DataList>
                <asp:SqlDataSource ID="comments" runat="server" 
                    ConnectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\RUHRestaurantsDB.accdb;Persist Security Info=True" 
                    ProviderName="System.Data.OleDb" 
                    >
                </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
        
            <td colspan="10" class="style2">
            <br />
            <br />
                <b>Add new comment</b><br />
                 <hr />
Your Rating For The Restaurant
            <div class="HeaderFont" >
            <cc1:Rating ID="Rating1" runat="server"
                    StarCssClass="ratingStar"
                    EmptyStarCssClass="emptyRatingStar"
                    FilledStarCssClass="filledRatingStar"
                    WaitingStarCssClass="savedRatingStar"
                    CurrentRating="1"
                    MaxRating="5"
                  >
                  </cc1:Rating></div>
               
                  <br />
                <br />
                Title:<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="Titletxt" ErrorMessage="*" ValidationGroup="comments"></asp:RequiredFieldValidator>
                <br />
                <asp:TextBox ID="Titletxt" runat="server" Width="485px" 
                    ValidationGroup="comment"></asp:TextBox>
                <br />
                Tags:<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="TagField" ErrorMessage="*" ValidationGroup="comments"></asp:RequiredFieldValidator>
                <br />
                <asp:TextBox ID="TagField" runat="server" Width="485px" 
                    ValidationGroup="comment" ></asp:TextBox>
                <br />
                <br />
                Existing Tags: <asp:PlaceHolder ID="ExistingTags" runat="server"></asp:PlaceHolder>
                 <br />
                Comment:<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="commentstxt" ErrorMessage="*" 
                    ValidationGroup="comments"></asp:RequiredFieldValidator>
                <br />
                <asp:TextBox ID="commentstxt" runat="server" Height="101px" TextMode="MultiLine" 
                    Width="485px" ValidationGroup="comment"></asp:TextBox>
                <br />
                <asp:HiddenField ID="CommentID" runat="server" />
                <br />
&nbsp;<asp:Button ID="Button1" runat="server" Text="Submit" ValidationGroup="comments" />
            &nbsp;</td>
        </tr>
    </table>

        
</asp:Content>
